import { _delete, get, put } from '@/ck/plugin/axios'

class Banner {

  static async getBanners (page = 0, count = 10) {
    return get('v1/banner/page', {
      page,
      count
    })
  }

  static async getDetail (id) {
    return get(`v1/banner/${id}`)
  }

  static async updata (id, data) {
    return put(`v1/banner/${id}`, data)
  }

  static async delete (id) {
    return _delete(`v1/banner/${id}`)
  }
}

export default Banner
